package healththink



import grails.test.mixin.*
import org.junit.*

/**
 * See the API for {@link grails.test.mixin.domain.DomainClassUnitTestMixin} for usage instructions
 */
@TestFor(FacilityScheduleEntry)
class FacilityScheduleEntryTests {

	@Test
    void testFacilityScheduleEntry() {
        FacilityScheduleEntry target = HealthThink.getStaticFacilityScheduleEntry()
		Facility facility = HealthThink.getStaticFacility()
		User user = HealthThink.getStaticUser()
		
		target.facility = facility
		target.user = user
	   
		assertNotNull("(error)FacilityScheduleEntry Target Null", target)
		assertNotNull("(error)FacilityScheduleEntry Validation Was Not Successfull", target.validate())
		
		target = target.save(flush:true)
		FacilityScheduleEntry expected = FacilityScheduleEntry.findById(target.id)
		
		assertNotNull("(error)FacilityScheduleEntry Target was not saved", target)
		assertNotNull("(error)Expected FacilityScheduleEntry was null", expected)
		assertEquals("(error)Target and Expected are not Equal", target, expected)
		   
		target.delete(flush:true)
    }
}
